package control;

import database.Database;
import java.sql.SQLException;
import model.ProgramValue;

/**
 * Denne klasse håndterr manipulation af ProgramValue
 * @author Sonny Sandberg
 */
public abstract class ProgramValueControl 
{
    /**
     * Tilføj nye program værdier
     * @param ProgramValue
     * @return
     * @throws ClassNotFoundException
     * @throws SQLException 
     */
    public static int assignNewProgramValues(ProgramValue current) throws ClassNotFoundException, SQLException
    {
        Database db = new Database();
        
        int added = db.manipulateDB("INSERT INTO bs_program_values (vat, environment_tax) VALUES ('"+current.getVat()+"', '"+current.getEnvironment_tax()+"')");
        db.closeDB();
        return added;
    }
}